<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
      <#assign base=request.contextPath  />
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title></title>
    <link rel="stylesheet" href="${base}/frame/layui/css/layui.css">
    <link rel="stylesheet" href="${base}/frame/static/css/style.css">
    <link rel="icon" href="${base}/frame/static/image/code.png">
    <script type="text/javascript" src="${base}/js/zhang.js"></script>

    <style type="text/css">
    </style>
    <style>
        html { overflow-x: hidden; overflow-y: auto; }
        .layui-table-cell{
            height: auto;
            line-height: ;
        }
    </style>
</head>
<body class="body">
        <!-- 工具集 -->

        <div class="my-btn-box">
            <span style="height: 50px;">

				
                <div class="layui-input-inline">
                	<label class="layui-form-label">车牌号</label>
                    <input type="text" autocomplete="off" id="carNumber" placeholder="" class="layui-input"  style="width: 150px;height: 31px;margin-top: 4px;">
                </div>
                <button class="layui-btn  layui-btn-sm layui-btn-normal" id="seche22">查询</button>
            </span>
            <table class="layui-hide" id="test" lay-filter="test"></table>
        </div>
        <!-- table -->

			<#--<script type="text/html" id="barDemo">
                <a class="layui-btn   layui-btn-xs layui-btn-primary"  onclick="tui('{{d.carId}}')">退租</a>
                <a class="layui-btn   layui-btn-xs layui-btn-primary" lay-event="edit">续租</a>
			</script>-->
        <script src="${base}/js/jquery.min.js"></script>
        <script   src="${base}/frame/layui/layui.all.js"></script>
        <script type="text/javascript" src="${base}/js/index.js"></script>
<script type="text/javascript">

    // layui方法
    layui.use(['laydate','tree', 'table', 'vip_table', 'layer'], function () {

        // 操作对象
        var laydate = layui.laydate
                , table = layui.table
                , vipTable = layui.vip_table
                , layer = layui.layer
                , $ = layui.jquery;

        // 表格渲染
        var tableIns = table.render({
			url: '${base}/xuzu/selectlishi',
			title: '用户数据表',
            toolbar: '#toolbarDemo',
            elem: '#test',                  //指定原始表格元素选择器（推荐id选择器）
            cols: [[                  //标题栏
               {field: 'ptName', title: '所属公司',width:90,align: 'center'}
                ,{field: 'carNumber', title: '车牌号',width:80,align: 'center'}
                , {field: 'carType', title: '车型号',width:90,align: 'center'}
                //, {field: 'carBrand', title: '车品牌',width:90,align: 'center'}
                , {field: 'carName', title: '车名',width:90,align: 'center'}
                , {field: 't', title: '创建时间',align: 'center'}
                //, {field: '', width:80, title: '原租车结束时间',align: 'center'}
                , {field: 'c', title: '续租车结束时间',align: 'center'}
                , {field: 'callName', title: '联系人名称',align: 'center'}
                , {field: 'callPhone', title: '联系人手机号',align: 'center'}
                //, {field: 'xxxxx', title: '操作',align: 'center', toolbar: '#barDemo'}
            ]]
            , id: 'testReload'
            ,height:480
            ,page: {
                layout: ['limit', 'count', 'prev', 'page', 'next', 'skip']
                ,theme: '#9AC747'
                ,limit: 10
            }

        });



    });
    //键盘事件
    $("body").bind("keydown",function(e){
        // 兼容FF和IE和Opera
        var theEvent = e || window.event;
        var code=theEvent.keyCode || theEvent.which || theEvent.charCode;
        if (code==13) {
            //回车执行查询
            $("#seche22").click();
        }
    });
    $('#seche22').on('click',function () {

        var whereData={};
        whereData.toeleUserName=Trim($("#carNumber").val())
        var table = layui.table;
        //表刷新方法
        table.reload('testReload', {
            url: '${base}/xuzu/selectlishi'
            ,where: whereData
        });
    })

</script>
</body>
</html>